Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created by
brew bumpCreated with
brew bump-formula-pr.release notes
Misc. Bug Fixes
::separators in paths with arguments (e.g.::core::mem::size_of::<libc::c_int>::()).allocavector at function-level scope, matching C.mem::transmute::<[u8; N], [c_char; N]>(*b"")instead of*mem::transmute::<&[u8; N], &mut [c_char; N]>(b"")).struct/union/enums withinstructs andunions.ioq3.Misc. Improvements
core::overlibc::andstd::, fixing--emit-no-std.[x; N]over[x, ..., x].++and--(i += 1; i;vs.i += 1;).use libconly when needed.New Instrinsics Added
_Static_assert__float128__builtin_rotateright*__builtin_ia32_pause__builtin_arm_yield__builtin_ia32_vperm2f128_pd256_mm256_permute2f128_pdChangelog
beararguments by @javierhonduco in docs/readme: Updatebeararguments immunant/c2rust#1206once_cell) by @folkertdev in CI updates (Ubuntu 22, LLVM 15, pinnedonce_cell) immunant/c2rust#1219libcdependencies. by @nnethercote in Remove somelibcdependencies. immunant/c2rust#1221rust-toolchain.tomlhandling by @joshtriplett in Fixes torust-toolchain.tomlhandling immunant/c2rust#1225libcusage inc2rust-transpileby @nnethercote in Reducelibcusage inc2rust-transpileimmunant/c2rust#1222libcusage by @nnethercote in Remove more unnecessarylibcusage immunant/c2rust#1229test_translator.pytests pass on LLVM 19 by @nnethercote in Maketest_translator.pytests pass on LLVM 19 immunant/c2rust#1230__float128, which shows up in clang headers on some systems by @joshtriplett in Support__float128, which shows up in clang headers on some systems immunant/c2rust#1235Punct::new(' ')infn convert_asmand updateproc-macro2by @kkysen in transpile: remove invalidPunct::new(' ')infn convert_asmand updateproc-macro2immunant/c2rust#1244transpile: some snapshot test fixes by @kkysen intranspile: some snapshot test fixes immunant/c2rust#1258transpile: impl__builtin_ia32_pauseand__builtin_arm_yieldby @thedataking intranspile: impl__builtin_ia32_pauseand__builtin_arm_yieldimmunant/c2rust#1263transpile: Add SIMD intrinsic__builtin_ia32_vperm2f128_pd256/_mm256_permute2f128_pdby @Kriskras99 intranspile: Add SIMD intrinsic__builtin_ia32_vperm2f128_pd256/_mm256_permute2f128_pdimmunant/c2rust#1129c_charis unsigned there) by @kkysen in transpile: fix doc tests on aarch64 (c_charis unsigned there) immunant/c2rust#1255transpile: impl__builtin_rotateright*ascore::intrinsics::rotate_rightby @kkysen intranspile: impl__builtin_rotateright*ascore::intrinsics::rotate_rightimmunant/c2rust#1259transpile: emit.rotate_{left,right}instead ofcore::intrinsics::rotate_{left,right}by @kkysen intranspile: emit.rotate_{left,right}instead ofcore::intrinsics::rotate_{left,right}immunant/c2rust#1260tests/requirements.txtdependencies into nix python environment by @Chobbes in Addtests/requirements.txtdependencies into nix python environment immunant/c2rust#1269uvby @kkysen in ci: switch python to useuvimmunant/c2rust#1276azure-pipelines.ymlto GitHub Actions with a matrix by @kkysen in ci: move macOSazure-pipelines.ymlto GitHub Actions with a matrix immunant/c2rust#1275archto the matrix for clarity by @kkysen in ci: addarchto the matrix for clarity immunant/c2rust#1284rustup) and run fast checks earlier by @kkysen in ci: reorder some steps to cache more (rustup) and run fast checks earlier immunant/c2rust#1289#![feature(nll)], stabilized in 1.63 by @kkysen in test_translator: remove#![feature(nll)], stabilized in 1.63 immunant/c2rust#1290provision_mac.sh(removed in #1275) and remove docker scripts by @kkysen in scripts: restoreprovision_mac.sh(removed in #1275) and remove docker scripts immunant/c2rust#1299.rsfiles, too by @kkysen in transpile: save platform-specific.rsfiles, too immunant/c2rust#1291__builtin_ia32_pause/__builtin_arm_yieldto emit_mm_pauseand__yieldinstead of cross-platformspin_loopby @kkysen in transpile: revert__builtin_ia32_pause/__builtin_arm_yieldto emit_mm_pauseand__yieldinstead of cross-platformspin_loopimmunant/c2rust#1292awalsh128/cache-apt-pkgs-action@latestto cacheapt installby @kkysen in ci: useawalsh128/cache-apt-pkgs-action@latestto cacheapt installimmunant/c2rust#1277*transpile*.c.snaps as Rust by @kkysen in transpile: syntax highlight*transpile*.c.snaps as Rust immunant/c2rust#1301test_casts.rsandcast_funptr.cby @kkysen in tests: fix out-of-bounds UB intest_casts.rsandcast_funptr.cimmunant/c2rust#1309macros.csnapshot by @kkysen in transpile: addmacros.csnapshot immunant/c2rust#1304--translate-const-macros conservativeby @kkysen in transpile: add--translate-const-macros conservativeimmunant/c2rust#1305--translate-{const,fn}-macros conservativethe default for the CLI, too" by @kkysen in Revert "transpile: make--translate-{const,fn}-macros conservativethe default for the CLI, too" immunant/c2rust#1313c2rust-testsuiteon all PRs, not just those intomasterby @kkysen in ci: runc2rust-testsuiteon all PRs, not just those intomasterimmunant/c2rust#1312macros.csnapshot by @kkysen in transpile: fix some mistakes inmacros.csnapshot immunant/c2rust#1314fn convert_exprdocs and remove unused code by @kkysen in transpile: updatefn convert_exprdocs and remove unused code immunant/c2rust#1323override_tys by @kkysen in transpile: insert casts at const macro expansion sites to their portableoverride_tys immunant/c2rust#1322c2rust transpileby @kkysen in readme: add known uses ofc2rust transpileimmunant/c2rust#1327TypedAstContext::macro_{invocations,expansions,expansion_test}intoIndexMaps instead ofHashMaps by @kkysen in transpile: makeTypedAstContext::macro_{invocations,expansions,expansion_test}intoIndexMaps instead ofHashMaps immunant/c2rust#1334single_attrandcall_attrto just usemk().meta_namevalue()andmk().meta_path()instead of creating structure itself by @bungcip in transpile: refactorsingle_attrandcall_attrto just usemk().meta_namevalue()andmk().meta_path()instead of creating structure itself immunant/c2rust#1343cmakeon macOS as it's already installed by @kkysen in ci: don't installcmakeon macOS as it's already installed immunant/c2rust#1351consts useunsafeblocks for--translate-const-macros conservativeby @kkysen in transpile: unconditionally makeconsts useunsafeblocks for--translate-const-macros conservativeimmunant/c2rust#1335ASTEntryTag::TagStaticAssertDeclconversion by @bungcip in properly handleASTEntryTag::TagStaticAssertDeclconversion immunant/c2rust#1342--translate-const-macros conservativeto a lot moreCExprKinds by @kkysen in transpile: expand--translate-const-macros conservativeto a lot moreCExprKinds immunant/c2rust#1306--translate-const-macros conservativeto handle statements by @kkysen in transpile: expand--translate-const-macros conservativeto handle statements immunant/c2rust#1338CTypeKind::UnaryTypes in--translate-const-macros conservativeby @kkysen in transpile: add support forCTypeKind::UnaryTypes in--translate-const-macros conservativeimmunant/c2rust#1346CastKind::ArrayToPointerDecays in--translate-const-macros conservativeby @kkysen in transpile: supportCastKind::ArrayToPointerDecays in--translate-const-macros conservativeimmunant/c2rust#1349override_tysto const macros by @kkysen in transpile: some simplifications before addingoverride_tysto const macros immunant/c2rust#1370unsafein const macro translations except where necessary by @fw-immunant in Avoidunsafein const macro translations except where necessary immunant/c2rust#1339allocavectors in top function scope by @Rua in Storeallocavectors in top function scope immunant/c2rust#1359instato1.43.2for the fix toINSTA_GLOB_FILTERso that the snapshot file is correctly resolved by @kkysen in transpile: updateinstato1.43.2for the fix toINSTA_GLOB_FILTERso that the snapshot file is correctly resolved immunant/c2rust#1377struct/union/enums withinstructs andunions by @bungcip in transpile: support anonymousstruct/union/enums withinstructs andunions immunant/c2rust#1361cargo runs to avoid file race conditions by @kkysen in pdg: use mutex aroundcargo runs to avoid file race conditions immunant/c2rust#1380core::ffi::c_*instead ofstd::ffi::c_*by @kkysen in transpile: usecore::ffi::c_*instead ofstd::ffi::c_*immunant/c2rust#1381records.csnapshot test to include #1381 after #1361 merged by @kkysen in transpile: updaterecords.csnapshot test to include #1381 after #1361 merged immunant/c2rust#1383libxml2by @kkysen in ci: enablelibxml2immunant/c2rust#1385DeclRefs by @kkysen in transpile: const macros: skipDeclRefs immunant/c2rust#1387c2rust-testsuitesincedpkg-querydoesn't work correctly by @kkysen in ci: don't cache apt pkgs forc2rust-testsuitesincedpkg-querydoesn't work correctly immunant/c2rust#1389SrcLocsorting by @kkysen in transpile: some docs/refactoring improvements made while fixingSrcLocsorting immunant/c2rust#1401SrcLocsorting by fixing include pathfileids by @kkysen in transpile: actually fixSrcLocsorting by fixing include pathfileids immunant/c2rust#1400New Contributors
beararguments immunant/c2rust#1206libcdependencies. immunant/c2rust#1221rust-toolchain.tomlhandling immunant/c2rust#1225tests/requirements.txtdependencies into nix python environment immunant/c2rust#1269Also, many thanks to @Rua and @bungcip for helping us fix a ton of bugs!
Full Changelog: immunant/c2rust@v0.20.0...v0.21.0
View the full release notes at https://github.com/immunant/c2rust/releases/tag/v0.21.0.